<template>
  <div>
    <h4>我是子组件</h4>
    <p>{{ toy }}</p>
    <button @click="getToy(toy)">点我传递玩具给父组件</button>
  </div>
</template>

<script setup lang="ts" name="Child">
import { ref, onMounted } from 'vue'

onMounted(() => {
  console.log('Child')
})

let toy = ref("奥特曼")

defineProps(['getToy'])

</script>

<style scoped>

</style>
